package cn.edu.model;

/**
 * @author 文欣雨
 * @version V1.0
 * @Package cn.edu.model
 * @date 2023/2/6 19:17
 * 图书类
 */
public class Book extends Publication {
    /**
     * 页数
     */
    private Integer number;

    @Override
    public void show() {
        System.out.println("图书: [" +
                "名称: '" + super.getName() + '\'' +
                ", 作者名称: '" + super.getAuthorName() + '\'' +
                ", 价格: " + super.getPrice() + '\'' +
                ", 总页数: " + number +
                ']');
    }

    public Book() {
    }

    public Book(String name, String authorName, Double price, Integer number) {
        super(name, authorName, price);
        this.number = number;
    }

    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

}
